<template>
    <div class="listDeal">
        <div
            class="zanwu"
            v-if="donelist.length==0"
        >
            <i class="iconfont icon-zanwushuju"></i>
            暂无数据
        </div>
        <div
            class="list"
            v-for="item in donelist"
            :key="item.value"
            @click="goDetails(item.safeId)"
        >
            <div><b>{{item.reactcontent}}</b><i class="iconfont icon-jiantou-copy right"></i>
            </div>
            <div class="flex">
                <div class="type">上报时间：{{getStr(item.time)}}</div>
                <div class="type"><i class="iconfont icon-shijian"></i>&nbsp;处理时限：{{item.timelimit}}天</div>
            </div>
            <div class="flex">
                <div class="type"><i class="iconfont icon-xitong"></i>&nbsp;项目：{{item.dicVal.dicSubitem}}</div>
                <div class="type"><i class="iconfont icon-ren"></i>&nbsp;处理人：{{item.personName.personName}}</div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            donelist: []
        }
    },
    mounted() {
        this.getDonelist()
    },
    methods: {
        getDonelist() {
            this.$api.safe.secondSafeOfficerList({
                safeTime: this.$route.query.reportingTime,
                status: this.$route.query.status
            }).then(res => {
                if (res.success) {
                    this.donelist = res.data
                }
            });
        },
        goDetails(safeId) {
            this.$router.push({ path: '/details-wc', query: { safeId: safeId } })
        },
        //字符串截取
        getStr(str) {
            if (str != undefined) {
                return str.toString().substring(0, 10)
            }
        },
    }
}
</script>

<style lang="less">
</style>
